package com.toycloud.business.controller.business;

import java.util.List;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;

import com.toycloud.business.dto.params.business.FeedbackProductVersionManagerDetailParams;
import com.toycloud.business.dto.results.CommonResult;
import com.toycloud.common.core.controller.BaseController;
import com.toycloud.common.core.utils.poi.ExcelUtil;
import com.toycloud.system.domain.business.FeedbackProductVersionManagerDetail;
import com.toycloud.system.log.annotation.Log;
import com.toycloud.system.log.enums.BusinessType;
import com.toycloud.system.mapper.business.FeedbackProductVersionManagerDetailMapper;
import com.toycloud.system.service.business.IFeedbackProductVersionManagerDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


/**
 * 产品版本管理关联Controller
 * 
 * @author ruoyi
 * @date 2024-12-18
 */
@RestController
@RequestMapping("/versiondetail")
public class FeedbackProductVersionManagerDetailController extends BaseController
{
    @Autowired
    private IFeedbackProductVersionManagerDetailService feedbackProductVersionManagerDetailService;
    @Resource
    private FeedbackProductVersionManagerDetailMapper feedbackProductVersionManagerDetailMapper;

    /**
     * 查询产品版本管理关联列表
     */
    @GetMapping("/list")
    public CommonResult<List<FeedbackProductVersionManagerDetail>> list(FeedbackProductVersionManagerDetailParams feedbackProductVersionManagerDetailParams)
    {
        return feedbackProductVersionManagerDetailService.selectFeedbackProductVersionManagerDetailList(feedbackProductVersionManagerDetailParams);
    }

    /**
     * 导出产品版本管理关联列表
     */
    @Log(title = "产品版本管理关联", businessType = BusinessType.EXPORT)
    @PostMapping("/export")
    public void export(HttpServletResponse response, FeedbackProductVersionManagerDetailParams feedbackProductVersionManagerDetailParams)
    {
        List<FeedbackProductVersionManagerDetail> list = feedbackProductVersionManagerDetailMapper.selectFeedbackProductVersionManagerDetailList(feedbackProductVersionManagerDetailParams);
        ExcelUtil<FeedbackProductVersionManagerDetail> util = new ExcelUtil<FeedbackProductVersionManagerDetail>(FeedbackProductVersionManagerDetail.class);
        util.exportExcel(response, list, "产品版本管理关联数据");
    }


}
